<template>
  <div class="box">
    <van-nav-bar title="标题" left-arrow />
    <div class="main">
      <search></search>
      <swiper :images="images"></swiper>
    </div>
  </div>
</template>

<script setup>
import { ref } from "vue";
import { swiperdataApi } from "@/api/api";
import search from "@/components/search.vue";
import swiper from "@/components/swiper.vue";
let images = ref([]);

const swiperFun = () => {
  swiperdataApi().then((res) => {
    images.value = res.data.message;
  });
};
swiperFun();
</script>

<style lang="scss" scoped>
.box {
  width: 100%;
  height: 100%;
  .swiper {
    width: 100%;
    height: 18rem;
    .van-swipe,
    .van-swipe-item,
    img {
      width: 100%;
      height: 100%;
    }
  }
}
</style>
